package com.xksms.miniotest.exception;
/**
 * @Author chengchao
 * @Description  异常枚举类
 * @Date 17:06 2022/6/14
 **/
public enum ExceptionEnum {
    SUCCESS(0, "操作成功"),
    ERROR(1,"操作失败"),
    //登录失败
    LOGIN_FAIL(999,"登录失败"),
    USERNAME_OR_PASSWORD_ERROR(1000, "用户名或密码错误"),
    PARAM_ERROR(1001, "参数错误"),
    CONTENT_IS_EMPTY(1002, "内容为空"),
    //token解析失败
    TOKEN_PARSE_ERROR(1003, "token解析失败"),
    ;



    /**
     * 消息码
     */
    private final int code;
    /**
     * 消息内容
     */
    private final String  msg;
    ExceptionEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}